import request from '../utils/request'

//定义navList
export interface NavWapModel {
    id: number,
    picUrl: string,
    mainTitle: string,
    viceTitle: string,
    columnUrl: string,
    onlineType: boolean,
    vaildStartTime: number,
    vaildEndTime: number,
    rank: number
}

export type NavList = NavWapModel[]

export interface NavWapData {
    code: number,
    data: {
        checkNavType: boolean,
        navList: NavList,
        delNavId: null
    }
}

export default {
    //发送请求 获取轮播图的数据
    getSwiperData() {
        return request.get<any, NavWapData>('/api/topic/v1/know/navWap.json')
    },
    // 发送请求，获取瀑布流分页数据
    getWaterfallData(page:number,size: number) {
        return request.get<any, any>(`/api/topic/v1/find/recAuto.json?page=${page}&size=${size}`)
    }
}

